﻿<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" Title="系统产品管理" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="headPlaceHolder" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server">
     <div style="height: 40px; line-height: 40px; padding: 0 10px;">
        <div class="pull-right" style="height: 40px; line-height: 40px;">
            <input id="SearchTxt" type="text" style="width:300px;" />
            <button id="queryBtn" class="btn  btn-primary btn-large">
                <i class="icon-search icon-white"></i>查询</button>
            <a href="editor.aspx" class="btn  btn-primary btn-large"><i class="icon-plus-sign icon-white"></i>新增系统产品</a>
        </div>
        <div class="pull-left" style="height: 40px; line-height: 40px;">
            <h2 id="bigTitle">
                系统产品
            </h2>
        </div>
    </div>
    <hr />
    <ul id="dataList" class="thumbnails">
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="javascriptPlaceHolder" Runat="Server">
    <script type="text/javascript">
	function loadData(str) {
        $.get('list.aspx', {
            questr: str
        },
        function(data) {
            $("#dataList").html('');
            $("#dataList").showHtml(data, 500);

            $('#dataList button.btn-danger').click(function() {
                DeleteSolution($(this).attr("value"));
            });

            $('#dataList button.btn-danger').confirm({
                msg: '确定删除?',
                //stopAfter:'ok',
                //eventType:'mouseover',
                //timeout:1000,
                buttons: {
                    ok: '确定',
                    cancel: '取消',
                    separator: '/'
                }
            });
        });
    }

    function DeleteSolution(id) {
        $.get('Delete.ashx', {
            sid: id
        },
        function(data) {
            loadData("");
        });
    }

     jQuery(document).ready(function() {
          loadData("");
          
           $('#queryBtn').click(function() {
                 var str = document.getElementById("SearchTxt").value;
                loadData(str);
            });
        });

	</script>
</asp:Content>

